package com.hai.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author NieChangan
 * @since 2022-05-26
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("biz_product")
public class Product extends Model<Product> {

    @TableField("id")
    private Long id;

    /**
     * 商品编号
     */
    @TableField("p_num")
    private String pNum;

    /**
     * 商品名称
     */
    @TableField("name")
    private String name;

    /**
     * 图片
     */
    @TableField("image_url")
    private String imageUrl;

    /**
     * 规格型号
     */
    @TableField("model")
    private String model;

    /**
     * 计算单位
     */
    @TableField("unit")
    private String unit;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 排序
     */
    @TableField("sort")
    private Integer sort;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField("modified_time")
    private LocalDateTime modifiedTime;

    /**
     * 1级分类
     */
    @TableField("one_category_id")
    private Long oneCategoryId;

    /**
     * 2级分类
     */
    @TableField("two_category_id")
    private Long twoCategoryId;

    /**
     * 3级分类
     */
    @TableField("three_category_id")
    private Long threeCategoryId;

    /**
     * 是否删除:1物资正常,0:物资回收,2:物资审核中
     */
    @TableField("status")
    private Integer status;


    @Override
    public Serializable pkVal() {
        return null;
    }

}
